package com.zhaofujun.filequeue;

import java.io.File;


public class SegmentInfo {

    /**
     * 在总队列中的位置
     */
    private final long position;
    /**
     * 在段文件中的索引
     */
    private final int index;
    /**
     * 段文件编号
     */
    private final long segmentNumber;
    /**
     * 段文件
     */
    private final File segmentFile;

    public SegmentInfo(long position, int index, long segmentNumber, File segmentFile) {
        this.position = position;
        this.index = index;
        this.segmentNumber = segmentNumber;
        this.segmentFile = segmentFile;
    }

    public long getPosition() {
        return position;
    }

    public int getIndex() {
        return index;
    }

    public long getSegmentNumber() {
        return segmentNumber;
    }

    public File getSegmentFile() {
        return segmentFile;
    }


        @Override
        public String toString() {
            return "SegmentInfo{" +
                    "position=" + position +
                    ", index=" + index +
                    ", segmentNumber=" + segmentNumber +
                    ", segmentFile=" + segmentFile +
                    '}';
        }
}
